package com.entity;

import java.util.List;

public class Shop {

    private List<Product> products;

    public List<Product> getProducts() {
        return products;
    }

    public void setProducts(List<Product> products) {
        this.products = products;
    }

    public Product getProduct(Class clazz) {
        for (Product p : products) {
            if (p.getClass() == clazz) {
                return p;
            }
        }
        return null;
    }
}
